package com.emm.yixun.openapi.controller;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.emm.yixun.common.app.*;
import com.emm.yixun.common.app.servletentity.HomePageListRes;
import com.emm.yixun.common.enums.FunctionTypeEnum;
import com.emm.yixun.common.enums.ModelTypeEnum;
import com.emm.yixun.common.enums.ResultEnum;
import com.emm.yixun.common.model.*;
import com.emm.yixun.common.model.dto.*;
import com.emm.yixun.common.model.enums.DelFlagEnum;
import com.emm.yixun.common.model.enums.IsAvlidEnum;
import com.emm.yixun.common.page.Page;
import com.emm.yixun.common.page.PageUtil;
import com.emm.yixun.common.response.Response;
import com.emm.yixun.common.response.ResponseList;
import com.emm.yixun.customer.service.*;
import com.emm.yixun.marketing.service.NeedReceiveRefundServiceFacade;
import com.emm.yixun.openapi.anotations.MerchantApiConfig;
import com.emm.yixun.openapi.anotations.UserOperationLog;
import com.emm.yixun.openapi.dto.base.BaseResponseDTO;
import com.emm.yixun.openapi.hander.*;
import com.emm.yixun.openapi.vo.*;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
//import java.util.Optional;

@Controller
@RequestMapping("/appapi")
public class ApiController {
    @Autowired
    private LoginHander loginHander;
    @Autowired
    private EditPwdHander editPwdHander;
    @Autowired
    private LogoutHander logoutHander;
    @Autowired
    private RemoteLoginHander remoteLoginHander;
    @Autowired
    private GetProjectListHander getProjectListHander;
    @Autowired
    private GetProjectBusinessListHander getProjectBusinessListHander;
    @Autowired
    private GetMemberInfoHander getMemberInfoHander;
    @Autowired
    private EditMemberInfoHander editMemberInfoHander;
    @Autowired
    private GetMemberScoreListHander getMemberScoreListHander;
    @Autowired
    private GetHeroListHander getHeroListHander;
    @Autowired
    private GetNoticeCategoryListHander getNoticeCategoryListHander;
    @Autowired
    private GetNoticeListHander getNoticeListHander;
    @Autowired
    private GetNoticeDetailHander getNoticeDetailHander;
    @Autowired
    private GetRemindListHander getRemindListHander;
    @Autowired
    private GetRemindCategoryListHander getRemindCategoryListHander;
    @Autowired
    private GetCustomerAnalysisListHander getCustomerAnalysisListHander;
    @Autowired
    private GetCustomerVisitAnalysisListHander getCustomerVisitAnalysisListHander;
    @Autowired
    private GetWorkloadStatisticsListHander getWorkloadStatisticsListHander;
    @Autowired
    private GetProvinceCityAreaHander getProvinceCityAreaHander;
    @Autowired
    private GetDictionaryListHander getDictionaryListHander;
    @Autowired
    private GetDictionaryListByProjectIdHander getDictionaryListByProjectIdHander;
    @Autowired
    private AddCustomerHander addCustomerHander;
    @Autowired
    private AddCustomerIntentionHander addCustomerIntentionHander;
    @Autowired
    private EditCustomerIntentionHander editCustomerIntentionHander;
    @Autowired
    private CheckCustomerIntentionLCHander checkCustomerIntentionLCHander;
    @Autowired
    private CheckCustomerPhoneHander checkCustomerPhoneHander;
    @Autowired
    private GetCustomerListHander getCustomerListHander;
    @Autowired
    private GetCustomerListLCHander getCustomerListLCHander;
    @Autowired
    private GetMerchantResouceHander getMerchantResouceHander;
    @Autowired
    private GetMerchantResouceLCHander getMerchantResouceLCHander;
    @Autowired
    private GetSignedListHander getSignedListHander;
    @Autowired
    private AddSignedHander addSignedHander;
    @Autowired
    private EditSignedHander editSignedHander;
    @Autowired
    private GetSignedDetailHander getSignedDetailHander;
    @Autowired
    private GetAuditListHander getAuditListHander;
    @Autowired
    private EditCustomerHander editCustomerHander;
    @Autowired
    private BusinessAuditHander businessAuditHander;
    @Autowired
    private GetCustomerDetailHander getCustomerDetailHander;
    @Autowired
    private GetHouseTypeListHander getHouseTypeListHander;
    @Autowired
    private GetPremisesListHander getPremisesListHander;
    @Autowired
    private GetBuildingListHander getBuildingListHander;
    @Autowired
    private GetUnitListHander getUnitListHander;
    @Autowired
    private GetRoomListHander getRoomListHander;
    @Autowired
    private GetSearchListHander getSearchListHander;
    @Autowired
    private AddFollowHander addFollowHander;
    @Autowired
    private GetFollowListHander getFollowListHander;
    @Autowired
    private GetConsultantListHander getConsultantListHander;
    @Autowired
    private GetRecommendCustomerListHander getRecommendCustomerListHander;
    @Autowired
    private DistributionConsultantHander distributionConsultantHander;
    @Autowired
    private GetPayDepositListHander getPayDepositListHander;
    @Autowired
    private AddPayDepositHander addPayDepositHander;
    @Autowired
    private EditPayDepositHander editPayDepositHander;
    @Autowired
    private GetPayDepositDetailHander getPayDepositDetailHander;
    @Autowired
    private GetSubscribeListHander getSubscribeListHander;
    @Autowired
    private AddSubscribeHander addSubscribeHander;
    @Autowired
    private EditSubscribeHander editSubscribeHander;
    @Autowired
    private GetSubscribeDetailHander getSubscribeDetailHander;
    @Autowired
    private GetHousesListHander getHousesListHander;
    @Autowired
    private GetMarketingControlListHander getMarketingControlListHander;
    @Autowired
    private GetHousesDetailHander getHousesDetailHander;
    @Autowired
    private GetVersionHander getVersionHander;
    @Autowired
    private DownloadNewVersionHander downloadNewVersionHander;
    @Autowired
    private AddProjectRealMapHander addProjectRealMapHander;
    @Autowired
    private DelProjectRealMapHander delProjectRealMapHander;
    @Autowired
    private AddProblemFeedbackHander addProblemFeedbackHander;
    @Autowired
    private GetCalculatePriceHander getCalculatePriceHander;
    @Autowired
    private GetGroupHeroListHander getGroupHeroListHander;
    @Autowired
    private GetSalesTargetListHander getSalesTargetListHander;
    @Autowired
    private GetPriceRecordListHander getPriceRecordListHander;
    @Autowired
    private GetDealHouseListHander getDealHouseListHander;
    @Autowired
    private GetStockHouseListHander getStockHouseListHander;
    @Autowired
    private GetDealHouseTypeListHander getDealHouseTypeListHander;
    @Autowired
    private GetStockTimeListHander getStockTimeListHander;
    @Autowired
    private GetPaymentNotSignedListHander getPaymentNotSignedListHander;
    @Autowired
    private GetNextReminderListHander getNextReminderListHander;
    @Autowired
    private GetSignedHaveAmountHander getSignedHaveAmountHander;
    @Autowired
    private EditFollowHander editFollowHander;
    @Autowired
    private GetUserCallListHander getUserCallListHander;
    @Autowired
    private GetCallBackHander getCallBackHander;
    @Autowired
    private GetNonpaymentListHander getNonpaymentListHander;
    @Autowired
    private GetNonpaymentNumHander getNonpaymentNumHander;
    @Autowired
    private GetSignedPageHander getSignedPageHander;
    @Autowired
    private GetSubscribePageHander getSubscribePageHander;
    @Autowired
    private GetContactWayHander getContactWayHander;
    @Autowired
    private AddContactWayHander addContactWayHander;
    @Autowired
    private GetTimeConditionAnalysisHander getTimeConditionAnalysisHander;
    @Autowired
    private GetTagTypeListHander getTagTypeListHander;
    @Autowired
    private VerifyingMobileHander verifyingMobileHander;
    /**
     * 绿城扩展("回来了社区")
     */
    @Autowired
    private QueryProjectInfoHander queryProjectInfoHander;
    @Autowired
    private QueryAgentInfoHander queryAgentInfoHander;
    @Autowired
    private QueryProjectRelationAgentInfoHander queryProjectRelationAgentInfoHander;
    @Autowired
    private QueryCustomerInfoHander queryCustomerInfoHander;
    @Autowired
    private QueryCustomerFollowInfoHander queryCustomerFollowInfoHander;
    @Autowired
    private QueryProjectRoomInfoListHander queryProjectRoomInfoListHander;
    @Autowired
    private QueryCustomerRoomListHander queryCustomerRoomListHander;
    @Autowired
    private QueryProjectQuestionnaireListHander queryProjectQuestionnaireListHander;
    //自定义问卷
    @Autowired
    private ProjectQuestionServiceFacade projectQuestionServiceFacade;
    @Autowired
    private CustomerAnswerServiceFacade customerAnswerServiceFacade;
    //客户标签
    @Autowired
    private TagServiceFacade tagServiceFacade;
    @Autowired
    private TagValueServiceFacade tagValueServiceFacade;
    @Autowired
    private CustTagServiceFacade custTagServiceFacade;
    @Autowired
    private SubscribeServiceFacade subscribeServiceFacade;
    @Autowired
    private NeedReceiveRefundServiceFacade needReceiveRefundServiceFacade;

    /**
     * 登录类
     * <p>
     * （1）	登陆接口(login)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_11, getModelName = ModelTypeEnum.MODELTYPE_4, isLogin = true)
    public String login(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        LoginReqVo reqDto = JSONObject.parseObject(body, LoginReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(loginHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 登录类
     * <p>
     * （2）修改密码接口(editPwd)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/editPwd", method = RequestMethod.POST)
    public String editPwd(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        EditPwdReqVo reqDto = JSONObject.parseObject(body, EditPwdReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(editPwdHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 登录类
     * <p>
     * （3）退出登录接口(logout)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/logout", method = RequestMethod.POST)
    public String logout(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        LogoutReqVo reqDto = JSONObject.parseObject(body, LogoutReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(logoutHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 登录类
     * <p>
     * （4）异地登录接口(remoteLogin)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/remoteLogin", method = RequestMethod.POST)
    public String remoteLogin(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        RemoteLoginReqVo reqDto = JSONObject.parseObject(body, RemoteLoginReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(remoteLoginHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 首页类
     * <p>
     * （1）查询项目列表接口(getProjectList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getProjectList", method = RequestMethod.POST)
    public String getProjectList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetProjectListReqVo reqDto = JSONObject.parseObject(body, GetProjectListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getProjectListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 首页类
     * <p>
     * （2）查询项目下业务列表接口(getProjectBusinessList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getProjectBusinessList", method = RequestMethod.POST)
    public String getProjectBusinessList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetProjectBusinessListReqVo reqDto = JSONObject.parseObject(body, GetProjectBusinessListReqVo.class);
        BaseResponseDTO res = getProjectBusinessListHander.hander(reqDto);
        if(GetProjectBusinessListResDto.class.isInstance(res.getResData())){
            GetProjectBusinessListResDto dto = (GetProjectBusinessListResDto) res.getResData();
            for(HomePageListRes item:dto.getHomePageList()){
                if("逾期未付款".equals(item.getHomePageName())){
                    Integer num = selectOverduePaymentCount(reqDto).getEntity();
                    if(num != null){
                        item.setHomePageNoReadNum(num.toString());
                    }
                }
                if("逾期未签约".equals(item.getHomePageName())){
                    Integer num = selectOverdueSignedCount(reqDto).getEntity();
                    if(num != null){
                        item.setHomePageNoReadNum(num.toString());
                    }
                }
            }
        }

        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(res, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 个人设置类
     * <p>
     * （1）查询会员信息接口(getMemberInfo)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getMemberInfo", method = RequestMethod.POST)
    public String getMemberInfo(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetMemberInfoReqVo reqDto = JSONObject.parseObject(body, GetMemberInfoReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getMemberInfoHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 个人设置类
     * <p>
     * （2）修改会员信息接口(editMemberInfo)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/editMemberInfo", method = RequestMethod.POST)
    public String editMemberInfo(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        EditMemberInfoReqVo reqDto = JSONObject.parseObject(body, EditMemberInfoReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(editMemberInfoHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 个人设置类
     * <p>
     * （3）查询会员成绩信息接口(getMemberScoreList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getMemberScoreList", method = RequestMethod.POST)
    public String getMemberScoreList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetMemberScoreListReqVo reqDto = JSONObject.parseObject(body, GetMemberScoreListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getMemberScoreListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 个人设置类
     * <p>
     * （4）查询英雄榜信息(getHeroList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getHeroList", method = RequestMethod.POST)
    public String getHeroList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetHeroListReqVo reqDto = JSONObject.parseObject(body, GetHeroListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getHeroListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （1）查询公告类别列表接口(getNoticeCategoryList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getNoticeCategoryList", method = RequestMethod.POST)
    public String getNoticeCategoryList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetNoticeCategoryListReqVo reqDto = JSONObject.parseObject(body, GetNoticeCategoryListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getNoticeCategoryListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （1）查询公告列表接口(getNoticeList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getNoticeList", method = RequestMethod.POST)
    public String getNoticeList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetNoticeListReqVo reqDto = JSONObject.parseObject(body, GetNoticeListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getNoticeListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （2）查询公告详情接口(getNoticeDetail)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getNoticeDetail", method = RequestMethod.POST)
    public String getNoticeDetail(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetNoticeDetailReqVo reqDto = JSONObject.parseObject(body, GetNoticeDetailReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getNoticeDetailHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （3）查询提醒列表接口(getRemindList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getRemindList", method = RequestMethod.POST)
    public String getRemindList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetRemindListReqVo reqDto = JSONObject.parseObject(body, GetRemindListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getRemindListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （4）查询提醒分类列表接口(getRemindCategoryList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getRemindCategoryList", method = RequestMethod.POST)
    public String getRemindCategoryList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetRemindCategoryListReqVo reqDto = JSONObject.parseObject(body, GetRemindCategoryListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getRemindCategoryListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （5）查询客户分析(getCustomerAnalysisList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getCustomerAnalysisList", method = RequestMethod.POST)
    public String getCustomerAnalysisList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetCustomerAnalysisListReqVo reqDto = JSONObject.parseObject(body, GetCustomerAnalysisListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getCustomerAnalysisListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （6）查询客户来访分析(getCustomerVisitAnalysisList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getCustomerVisitAnalysisList", method = RequestMethod.POST)
    public String getCustomerVisitAnalysisList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetCustomerVisitAnalysisListReqVo reqDto = JSONObject.parseObject(body, GetCustomerVisitAnalysisListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getCustomerVisitAnalysisListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （7）查询工作量统计(getWorkloadStatisticsList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getWorkloadStatisticsList", method = RequestMethod.POST)
    public String getWorkloadStatisticsList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetWorkloadStatisticsListReqVo reqDto = JSONObject.parseObject(body, GetWorkloadStatisticsListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getWorkloadStatisticsListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （8）查询省市区接口(getProvinceCityArea)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getProvinceCityArea", method = RequestMethod.POST)
    public String getProvinceCityArea(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetProvinceCityAreaReqVo reqDto = JSONObject.parseObject(body, GetProvinceCityAreaReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getProvinceCityAreaHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （9）查询字典列表接口(getDictionaryList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getDictionaryList", method = RequestMethod.POST)
    public String getDictionaryList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetDictionaryListReqVo reqDto = JSONObject.parseObject(body, GetDictionaryListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getDictionaryListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * （10）根据项目ID查询全部字典列表接口(getDictionaryListByProjectId)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getDictionaryListByProjectId", method = RequestMethod.POST)
    public String getDictionaryListByProjectId(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetDictionaryListReqVo reqDto = JSONObject.parseObject(body, GetDictionaryListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getDictionaryListByProjectIdHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 新增客户
     *-
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/checkCustomerPhone", method = RequestMethod.POST)
    public String checkCustomerPhone(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        CheckCustomerPhoneReqVo reqVo = JSONObject.parseObject(body, CheckCustomerPhoneReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        checkCustomerPhoneHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 新增客户
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "新增客户")
    @RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
    @MerchantApiConfig(resourcesUrl = "addCustomerLC")
    public String addCustomer(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddCustomerReqVo reqVo = JSONObject.parseObject(body, AddCustomerReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        addCustomerHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    public String addCustomerLC(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddCustomerIntentionReqVo reqVo = JSONObject.parseObject(body, AddCustomerIntentionReqVo.class);
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        addCustomerIntentionHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    @RequestMapping(value = "/getMerchantResource", method = RequestMethod.POST)
    @MerchantApiConfig(resourcesUrl = "getMerchantResourceLC")
    public String getMerchantResource(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetMerchantResouceReqVo reqVo = JSONObject.parseObject(body, GetMerchantResouceReqVo.class);
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getMerchantResouceHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    public String getMerchantResourceLC(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetMerchantResouceReqVo reqVo = JSONObject.parseObject(body, GetMerchantResouceReqVo.class);
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getMerchantResouceLCHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （3）修改客户接口(editCustomer)
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "修改客户")
    @RequestMapping(value = "/editCustomer", method = RequestMethod.POST)
    @MerchantApiConfig(resourcesUrl = "editCustomerLC")
    public String editCustomer(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        EditCustomerReqVo reqDto = JSONObject.parseObject(body, EditCustomerReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(editCustomerHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    public String editCustomerLC(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        EditCustomerIntentionReqVo reqDto = JSONObject.parseObject(body, EditCustomerIntentionReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(editCustomerIntentionHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 验证客户意向等级
     * 1.验证客户端等级是否与所填字段匹配
     * 2.验证是否为A等级 (认购，签约)
     *
     * @param model
     * 
     * @param response
     * @param body
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/checkCustomerIntention", method = RequestMethod.POST)
    public String checkCustomer(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        CheckCustomerIntentionReqVo reqDto = JSONObject.parseObject(body, CheckCustomerIntentionReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(checkCustomerIntentionLCHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;

    }

    /**
     * 查询客户列表
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getCustomerList", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_0, getModelName = ModelTypeEnum.MODELTYPE_0)
    @MerchantApiConfig(resourcesUrl = "getCustomerListLC")
    public String getCustomerList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetCustomerListReqVo reqVo = JSONObject.parseObject(body, GetCustomerListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getCustomerListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询客户列表，绿城定制功能（最新跟进--》暂未跟进）
     *
     * @param model
     * 
     * @param response
     * @param body
     * @return
     * @throws IOException
     */
    public String getCustomerListLC(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetCustomerListReqVo reqVo = JSONObject.parseObject(body, GetCustomerListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getCustomerListLCHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询客户详情
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "查询客户详情")
        @RequestMapping(value = "/getCustomerDetail", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_1, getModelName = ModelTypeEnum.MODELTYPE_0)
    public String getCustomerDetail(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetCustomerDetailReqVo reqVo = JSONObject.parseObject(body, GetCustomerDetailReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getCustomerDetailHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询可关注户型
     *
     */
    @RequestMapping(value = "/getHouseTypeList", method = RequestMethod.POST)
    public String getHouseTypeList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetHouseTypeListReqVo reqVo = JSONObject.parseObject(body, GetHouseTypeListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getHouseTypeListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询可关注组团(楼盘)
     *
     */
    @RequestMapping(value = "/getPremisesList", method = RequestMethod.POST)
    public String getPremisesList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetPremisesListReqVo reqVo = JSONObject.parseObject(body, GetPremisesListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getPremisesListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询可关注楼栋
     *
     */
    @RequestMapping(value = "/getBuildingList", method = RequestMethod.POST)
    public String getBuildingList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetBuildingListReqVo reqVo = JSONObject.parseObject(body, GetBuildingListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getBuildingListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询可关注单元
     *
     */
    @RequestMapping(value = "/getUnitList", method = RequestMethod.POST)
    public String getUnitList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetUnitListReqVo reqVo = JSONObject.parseObject(body, GetUnitListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getUnitListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询可关注房号
     *
     */
    @RequestMapping(value = "/getRoomList", method = RequestMethod.POST)
    public String getRoomList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetRoomListReqVo reqVo = JSONObject.parseObject(body, GetRoomListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getRoomListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户搜索
     */
    @RequestMapping(value = "/getSearchList", method = RequestMethod.POST)
    public String getSearchList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSearchListReqVo reqVo = JSONObject.parseObject(body, GetSearchListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getSearchListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户新增跟进
     */
    @RequestMapping(value = "/addFollow", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_6, getModelName = ModelTypeEnum.MODELTYPE_0)
    public String addFollow(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddFollowReqVo reqVo = JSONObject.parseObject(body, AddFollowReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        addFollowHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询客户跟进
     */
    @RequestMapping(value = "/getFollowList", method = RequestMethod.POST)
    public String getFollowList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetFollowListReqVo reqVo = JSONObject.parseObject(body, GetFollowListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getFollowListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 查询置业顾问
     */
    @RequestMapping(value = "/getConsultantList", method = RequestMethod.POST)
    public String getConsultantList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetConsultantListReqVo reqVo = JSONObject.parseObject(body, GetConsultantListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getConsultantListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 认购、签约推荐人(客户)
     *
     */
    @RequestMapping(value = "/getRecommendCustomerListHander", method = RequestMethod.POST)
    public String getRecommendCustomerListHander(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetRecommendCustomerListReqVo reqVo = JSONObject.parseObject(body, GetRecommendCustomerListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getRecommendCustomerListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 分配置业顾问
     */
    @RequestMapping(value = "/distributionConsultant", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_10, getModelName = ModelTypeEnum.MODELTYPE_0)
    public String distributionConsultant(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        DistributionConsultantReqVo reqVo = JSONObject.parseObject(body, DistributionConsultantReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        distributionConsultantHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 认筹列表
     */
    @RequestMapping(value = "/getPayDepositList", method = RequestMethod.POST)
    public String getPayDepositList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetPayDepositListReqVo reqVo = JSONObject.parseObject(body, GetPayDepositListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getPayDepositListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 新增认筹
     *
     */
    @RequestMapping(value = "/addPayDeposit", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_3, getModelName = ModelTypeEnum.MODELTYPE_2)
    public String addPayDeposit(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddPayDepositReqVo reqVo = JSONObject.parseObject(body, AddPayDepositReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        addPayDepositHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 修改认筹
     */
    @RequestMapping(value = "/editPayDeposit", method = RequestMethod.POST)
    public String editPayDeposit(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        EditPayDepositReqVo reqVo = JSONObject.parseObject(body, EditPayDepositReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        editPayDepositHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 认筹详情
     *
     */
    @RequestMapping(value = "/getPayDepositDetail", method = RequestMethod.POST)
    public String getPayDepositDetail(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetPayDepositDetailReqVo reqVo = JSONObject.parseObject(body, GetPayDepositDetailReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getPayDepositDetailHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 认购列表
     */
    @RequestMapping(value = "/getSubscribeList", method = RequestMethod.POST)
    public String getSubscribeList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSubscribeListReqVo reqVo = JSONObject.parseObject(body, GetSubscribeListReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getSubscribeListHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 新增认购
     *
     */
    @RequestMapping(value = "/addSubscribe", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_4, getModelName = ModelTypeEnum.MODELTYPE_2)
    public String addSubscribe(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddSubscribeReqVo reqVo = JSONObject.parseObject(body, AddSubscribeReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        addSubscribeHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 修改认购
     */
    @RequestMapping(value = "/editSubscribe", method = RequestMethod.POST)
    public String editSubscribe(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        EditSubscribeReqVo reqVo = JSONObject.parseObject(body, EditSubscribeReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        editSubscribeHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 修改认购
     *
     */
    @RequestMapping(value = "/getSubscribeDetail", method = RequestMethod.POST)
    public String getSubscribeDetail(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSubscribeDetailReqVo reqVo = JSONObject.parseObject(body, GetSubscribeDetailReqVo.class);
        //WriteDateUseDateFormat 日期格式化
        //DisableCircularReferenceDetect 关闭循环引用
        //WriteNullStringAsEmpty NULL输入转换为""
        response.getWriter().append(
                JSONObject.toJSONStringWithDateFormat(
                        getSubscribeDetailHander.hander(reqVo)
                        , "yyyy-MM-dd HH:mm:ss"
                        , SerializerFeature.WriteDateUseDateFormat
                        , SerializerFeature.DisableCircularReferenceDetect
                        , SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （23）查询签约列表接口(getSignedList)
     *
     */
    @RequestMapping(value = "/getSignedList", method = RequestMethod.POST)
    public String getSignedList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSignedListReqVo reqDto = JSONObject.parseObject(body, GetSignedListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getSignedListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （24）新增签约接口(addSigned)
     */
    @ApiOperation(value = "新增签约")
    @RequestMapping(value = "/addSigned", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_5, getModelName = ModelTypeEnum.MODELTYPE_2)
    public String addSigned(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddSignedReqVo reqDto = JSONObject.parseObject(body, AddSignedReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(addSignedHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （25）修改签约接口(editSigned)
     *
     */
    @ApiOperation(value = "修改签约")
    @RequestMapping(value = "/editSigned", method = RequestMethod.POST)
    public String editSigned(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        EditSignedReqVo reqDto = JSONObject.parseObject(body, EditSignedReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(editSignedHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （26）查询签约详情接口(getSignedDetail)
     */
    @ApiOperation(value = "查询签约详情")
    @RequestMapping(value = "/getSignedDetail", method = RequestMethod.POST)
    public String getSignedDetail(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSignedDetailReqVo reqDto = JSONObject.parseObject(body, GetSignedDetailReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getSignedDetailHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （27）查询审核列表接口(getAuditList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getAuditList", method = RequestMethod.POST)
    public String getAuditList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetAuditListReqVo reqDto = JSONObject.parseObject(body, GetAuditListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getAuditListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （28）查询审核列表接口(businessAudit)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/businessAudit", method = RequestMethod.POST)
    public String businessAudit(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        BusinessAuditReqVo reqDto = JSONObject.parseObject(body, BusinessAuditReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(businessAuditHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 房源类
     * <p>
     * （1）查询房源列表接口(getHousesList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getHousesList", method = RequestMethod.POST)
    public String getHousesList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetHousesListReqVo reqDto = JSONObject.parseObject(body, GetHousesListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getHousesListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 房源类
     * <p>
     * （2）查询销控列表接口(getMarketingControlList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getMarketingControlList", method = RequestMethod.POST)
    public String getMarketingControlList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetMarketingControlListReqVo reqDto = JSONObject.parseObject(body, GetMarketingControlListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getMarketingControlListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 房源类
     * <p>
     * （3）查询房源详情接口(getHousesDetail)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getHousesDetail", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_2, getModelName = ModelTypeEnum.MODELTYPE_1)
    public String getHousesDetail(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetHousesDetailReqVo reqDto = JSONObject.parseObject(body, GetHousesDetailReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getHousesDetailHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 版本升级
     * <p>
     * （1）查询新版本接口(getVersion)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getVersion", method = RequestMethod.POST)
    public String getVersion(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetVersionReqVo reqDto = JSONObject.parseObject(body, GetVersionReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getVersionHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 版本升级
     * <p>
     * （2）下载新版本接口(downloadNewVersion)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/downloadNewVersion", method = RequestMethod.POST)
    public String downloadNewVersion(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        DownloadNewVersionReqVo reqDto = JSONObject.parseObject(body, DownloadNewVersionReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(downloadNewVersionHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 房源类
     * <p>
     * （4）新增项目实景图接口(addProjectRealMap)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/addProjectRealMap", method = RequestMethod.POST)
    public String addProjectRealMap(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddProjectRealMapReqVo reqDto = JSONObject.parseObject(body, AddProjectRealMapReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(addProjectRealMapHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 房源类
     * <p>
     * （5）删除项目实景图接口(delProjectRealMap)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/delProjectRealMap", method = RequestMethod.POST)
    public String delProjectRealMap(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        DelProjectRealMapReqVo reqDto = JSONObject.parseObject(body, DelProjectRealMapReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(delProjectRealMapHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 房源类
     * <p>
     * （6）算价接口(getCalculatePrice)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getCalculatePrice", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_7, getModelName = ModelTypeEnum.MODELTYPE_0)
    public String getCalculatePrice(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetCalculatePriceReqVo reqDto = JSONObject.parseObject(body, GetCalculatePriceReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getCalculatePriceHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 问题反馈
     * <p>
     * （1）新增问题反馈接口(addProblemFeedback)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/addProblemFeedback", method = RequestMethod.POST)
    public String addProblemFeedback(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddProblemFeedbackReqVo reqDto = JSONObject.parseObject(body, AddProblemFeedbackReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(addProblemFeedbackHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 个人设置类
     * <p>
     * （5）查询销售组英雄榜信息(getGroupHeroList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getGroupHeroList", method = RequestMethod.POST)
    public String getGroupHeroList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetGroupHeroListReqVo reqDto = JSONObject.parseObject(body, GetGroupHeroListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getGroupHeroListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （9）查询销售指标 (getSalesTargetList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getSalesTargetList", method = RequestMethod.POST)
    public String getSalesTargetList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSalesTargetListReqVo reqDto = JSONObject.parseObject(body, GetSalesTargetListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getSalesTargetListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （13）查询算价分析(getPriceRecordList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getPriceRecordList", method = RequestMethod.POST)
    public String getPriceRecordList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetPriceRecordListReqVo reqDto = JSONObject.parseObject(body, GetPriceRecordListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getPriceRecordListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （11）查询成交房源分析(getDealHouseList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getDealHouseList", method = RequestMethod.POST)
    public String getDealHouseList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetDealHouseListReqVo reqDto = JSONObject.parseObject(body, GetDealHouseListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getDealHouseListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （12）查询存量房源分析(getStockHouseList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getStockHouseList", method = RequestMethod.POST)
    public String getStockHouseList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetStockHouseListReqVo reqDto = JSONObject.parseObject(body, GetStockHouseListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getStockHouseListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （10）查询成交房源类型分析(getDealHouseTypeList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getDealHouseTypeList", method = RequestMethod.POST)
    public String getDealHouseTypeList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetDealHouseTypeListReqVo reqDto = JSONObject.parseObject(body, GetDealHouseTypeListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getDealHouseTypeListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （10）查询存量时间分析(getStockTimeList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getStockTimeList", method = RequestMethod.POST)
    public String getStockTimeList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetStockTimeListReqVo reqDto = JSONObject.parseObject(body, GetStockTimeListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getStockTimeListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （15）查询已签约未回款分析(getPaymentNotSignedList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getPaymentNotSignedList", method = RequestMethod.POST)
    public String getPaymentNotSignedList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetPaymentNotSignedListReqVo reqDto = JSONObject.parseObject(body, GetPaymentNotSignedListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getPaymentNotSignedListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （6）查询下次跟进提醒列表接口(getNextReminderList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getNextReminderList", method = RequestMethod.POST)
    public String getNextReminderList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetNextReminderListReqVo reqDto = JSONObject.parseObject(body, GetNextReminderListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getNextReminderListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （24）查询签约已收金额接口(getSignedHaveAmount)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getSignedHaveAmount", method = RequestMethod.POST)
    public String getSignedHaveAmount(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSignedHaveAmountReqVo reqDto = JSONObject.parseObject(body, GetSignedHaveAmountReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getSignedHaveAmountHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （12）更新客户跟进接口(editFollow)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/editFollow", method = RequestMethod.POST)
    public String editFollow(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        EditFollowReqVo reqDto = JSONObject.parseObject(body, EditFollowReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(editFollowHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （13）查询用户电话列表接口(getUserCallList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getUserCallList", method = RequestMethod.POST)
    public String getUserCallList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetUserCallListReqVo reqDto = JSONObject.parseObject(body, GetUserCallListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getUserCallListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 客户类
     * <p>
     * （14）查询电话回拨接口(getCallBack)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getCallBack", method = RequestMethod.POST)
    @UserOperationLog(getFunctionName = FunctionTypeEnum.FUNCTIONTYPE_8, getModelName = ModelTypeEnum.MODELTYPE_0)
    public String getCallBack(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetCallBackReqVo reqDto = JSONObject.parseObject(body, GetCallBackReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getCallBackHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 系统类
     * <p>
     * （19）时间条件查询分析接口(getTimeConditionAnalysis)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/getTimeConditionAnalysis", method = RequestMethod.POST)
    public String getTimeConditionAnalysis(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetTimeConditionAnalysisReqVo reqDto = JSONObject.parseObject(body, GetTimeConditionAnalysisReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getTimeConditionAnalysisHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 基本信息类接口（绿城扩展）
     * <p>
     * （1）项目信息全量查询接口(queryProjectInfo)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @ApiIgnore()
    @RequestMapping(value = "/queryProjectInfo", method = RequestMethod.POST)
    public String queryProjectInfo(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        QueryProjectInfoReqVo reqDto = JSONObject.parseObject(body, QueryProjectInfoReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(queryProjectInfoHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 基本信息类接口（绿城扩展）
     * <p>
     * （2）经纪人信息全量查询接口接口(queryAgentInfo)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @ApiIgnore()
    @RequestMapping(value = "/queryAgentInfo", method = RequestMethod.POST)
    public String queryAgentInfo(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        QueryAgentInfoReqVo reqDto = JSONObject.parseObject(body, QueryAgentInfoReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(queryAgentInfoHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 基本信息类接口（绿城扩展）
     * <p>
     * （3）经纪人与项目的归属关系全量查询接口(queryProjectRelationAgentInfo)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @ApiIgnore()
    @RequestMapping(value = "/queryProjectRelationAgentInfo", method = RequestMethod.POST)
    public String queryProjectRelationAgentInfo(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        QueryProjectRelationAgentInfoReqVo reqDto = JSONObject.parseObject(body, QueryProjectRelationAgentInfoReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(queryProjectRelationAgentInfoHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 基本信息类接口（绿城扩展）
     * <p>
     * （4）客户基本信息增量更新接口(queryCustomerInfo)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @ApiIgnore()
    @RequestMapping(value = "/queryCustomerInfo", method = RequestMethod.POST)
    public String queryCustomerInfo(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        QueryCustomerInfoReqVo reqDto = JSONObject.parseObject(body, QueryCustomerInfoReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(queryCustomerInfoHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 基本信息类接口（绿城扩展）
     * <p>
     * （5）客户跟进信息增量更新接口(queryCustomerFollowInfo)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @ApiIgnore()
    @RequestMapping(value = "/queryCustomerFollowInfo", method = RequestMethod.POST)
    public String queryCustomerFollowInfo(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        QueryCustomerFollowInfoReqVo reqDto = JSONObject.parseObject(body, QueryCustomerFollowInfoReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(queryCustomerFollowInfoHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * “回来了社区” 新增接口
     * <p>
     * （6）房产信息增量接口(queryProjectRoomInfoList)
     *
     * @param model
     * 
     * @param response
     * @return
     * @throws IOException
     */
    @ApiIgnore()
    @RequestMapping(value = "/queryProjectRoomInfoList", method = RequestMethod.POST)
    public String queryProjectRoomInfoList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        QueryProjectRoomInfoListReqVo reqDto = JSONObject.parseObject(body, QueryProjectRoomInfoListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(queryProjectRoomInfoListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * “回来了社区” 新增接口
     * <p>
     * （7）	客户与房产关联关系表增量接口 (queryCustomerRoomList)
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiIgnore()
    @RequestMapping(value = "/queryCustomerRoomList", method = RequestMethod.POST)
    public String queryCustomerRoomList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        QueryCustomerRoomListReqVo reqDto = JSONObject.parseObject(body, QueryCustomerRoomListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(queryCustomerRoomListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 验证手机号是否正确 (verifyingMobileHander)
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "验证手机号码")
    @RequestMapping(value = "/verifyingMobile", method = RequestMethod.POST)
    public String verifyingMobile(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        MobileUtilReqVo reqDto = JSONObject.parseObject(body, MobileUtilReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(verifyingMobileHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 签约回款提醒(签约未付款)
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "签约回款提醒分页查询")
    @RequestMapping(value = "/getNonpaymentPage", method = RequestMethod.POST)
    public String getNonpaymentPage(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetNonpaymentListReqVo reqDto = JSONObject.parseObject(body, GetNonpaymentListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getNonpaymentListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 签约回款提醒数量(签约未付款数量)
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiIgnore()
    @ApiOperation(value = "签约回款提醒数量", notes = "首页展示的数字")
    @RequestMapping(value = "/getNonpaymentNum", method = RequestMethod.POST)
    public String getNonpaymentNum(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetNonpaymentListReqVo reqDto = JSONObject.parseObject(body, GetNonpaymentListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getNonpaymentNumHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 获取服务器时间
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "获取服务器时间")
    @RequestMapping(value = "/getServerTime", method = RequestMethod.GET)
    public String getServerTime(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetServerTimeResDto resDto = new GetServerTimeResDto();
        resDto.setResult(ResultEnum.SUCCESS.getNo());
        resDto.setServerTime(Calendar.getInstance().getTime());
        BaseResponseDTO<GetServerTimeResDto> res = new BaseResponseDTO<GetServerTimeResDto>();
        res.setResData(resDto);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(res, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 签约列表分页查询
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "获取当前经纪人全部签约记录")
    @RequestMapping(value = "/getSignedPage", method = RequestMethod.POST)
    public String getSignedPage(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSignedPageReqVo reqDto = JSONObject.parseObject(body, GetSignedPageReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getSignedPageHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 签约列表分页查询
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "获取当前经纪人全部认购记录")
    @RequestMapping(value = "/getSubscribePage", method = RequestMethod.POST)
    public String getSubscribePage(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetSubscribePageReqVo reqDto = JSONObject.parseObject(body, GetSubscribePageReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getSubscribePageHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 获取首次接触方式
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "查询首次接触方式")
    @RequestMapping(value = "/getContactWay", method = RequestMethod.POST)
    public String getContactWay(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        GetContactWayReqVo reqDto = JSONObject.parseObject(body, GetContactWayReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getContactWayHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 修改首次接触方式
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @ApiOperation(value = "修改首次接触方式")
    @RequestMapping(value = "/addContactWay", method = RequestMethod.POST)
    public String addContactWay(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        AddContactWayReqVo reqDto = JSONObject.parseObject(body, AddContactWayReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(addContactWayHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 项目问卷列表
     *
     * @param model
     * 
     * @param response
     * 
     * @return
     * @throws IOException
     */
    @RequestMapping(value = "/queryProjectQuestionnaireList", method = RequestMethod.POST)
    public String queryProjectQuestionnaireList(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        QueryProjectQuestionnaireListReqVo reqDto = JSONObject.parseObject(body, QueryProjectQuestionnaireListReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(queryProjectQuestionnaireListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 跳转客户新增页面
     */
    @ApiOperation(value = "跳转客户编辑页面", notes = "跳转客户编辑页面")
    @RequestMapping(value = "/customer_add", method = RequestMethod.GET)
    public String customer_add(Model model, HttpServletRequest request, HttpServletResponse response, String body) {
        CustomerEditVo vo = JSONObject.parseObject(body, CustomerEditVo.class);
        CustomerEditDto dto = vo.getParams();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        model.addAttribute("terminalCode", dto.getTerminalCode());
        model.addAttribute("merchantId", dto.getMerchantId());
        model.addAttribute("projectId", dto.getProjectId());
        model.addAttribute("version", dto.getVersion());
        model.addAttribute("busNumType", dto.getBusNumType());
        model.addAttribute("busNum", dto.getBusNum());
        model.addAttribute("userId", dto.getUserId());
        model.addAttribute("token", dto.getToken());
        model.addAttribute("projectCode", dto.getProjectCode());
        model.addAttribute("nowDate",sdf.format(new Date()));
        String code = dto.getCode();
        if (StringUtils.isEmpty(code)) {
            code = "menu_0101_0002";
        }
        return addCustomerHander.getRedirectPath(dto.getMerchantId(), code,0);
    }


    /**
     * 跳转客户编辑页面
     */
    @ApiOperation(value = "跳转客户编辑页面", notes = "跳转客户编辑页面")
    @RequestMapping(value = "/customer_edit", method = RequestMethod.GET)
    public String customer_edit(Model model, HttpServletRequest request, HttpServletResponse response, String body) {
        CustomerEditVo vo = JSONObject.parseObject(body, CustomerEditVo.class);
        CustomerEditDto dto = vo.getParams();
        model.addAttribute("terminalCode", dto.getTerminalCode());
        model.addAttribute("merchantId", dto.getMerchantId());
        model.addAttribute("projectId", dto.getProjectId());
        model.addAttribute("version", dto.getVersion());
        model.addAttribute("busNumType", dto.getBusNumType());
        model.addAttribute("busNum", dto.getBusNum());
        model.addAttribute("userId", dto.getUserId());
        model.addAttribute("token", dto.getToken());
        model.addAttribute("projectCode", dto.getProjectCode());
        model.addAttribute("customerId", dto.getCustomerId());


        String code = dto.getCode();
        if (StringUtils.isEmpty(code)) {
            code = "menu_0101_0006";
        }
        return addCustomerHander.getRedirectPath(dto.getMerchantId(), code,1);
    }

    /**
     * 跳转客户查看页面（详情）
     */
    @ApiOperation(value = "跳转客户查看页面（详情）", notes = "跳转客户查看页面（详情）")
    @RequestMapping(value = "/customer_detail", method = RequestMethod.GET)
    public String customer_detail(Model model, HttpServletRequest request, HttpServletResponse response, String body) {
        CustomerEditVo vo = JSONObject.parseObject(body, CustomerEditVo.class);
        CustomerEditDto dto = vo.getParams();
        model.addAttribute("terminalCode", dto.getTerminalCode());
        model.addAttribute("merchantId", dto.getMerchantId());
        model.addAttribute("projectId", dto.getProjectId());
        model.addAttribute("version", dto.getVersion());
        model.addAttribute("busNumType", dto.getBusNumType());
        model.addAttribute("busNum", dto.getBusNum());
        model.addAttribute("userId", dto.getUserId());
        model.addAttribute("token", dto.getToken());
        model.addAttribute("projectCode", dto.getProjectCode());
        model.addAttribute("customerId", dto.getCustomerId());


        String code = dto.getCode();
        if (StringUtils.isEmpty(code)) {
            code = "menu_0101_0005";
        }
        return addCustomerHander.getRedirectPath(dto.getMerchantId(), code,2);
    }

    /**
     * 自定义问卷-打开问卷页面
     *
     * @param model
     * 
     * @return
     */
    @ApiOperation(value = "跳转问卷页面", notes = "app跳转H5接口")
    @RequestMapping(value = "/questionnaire", method = RequestMethod.GET)
    public String questionnaire(Model model, HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        ProjectQuestionReqVo reqVo = JSONObject.parseObject(body, ProjectQuestionReqVo.class);
        ProjectQuestionReqDto reqDto = reqVo.getParams();
        model.addAttribute("questionnaireId", reqDto.getQuestionnaireId());
        model.addAttribute("customerId", reqDto.getCustomerId());
        model.addAttribute("projectId", reqDto.getProjectId());
        model.addAttribute("userId", reqDto.getUserId());

        return "/questionnaire/questionnaire";
    }

    /**
     * 自定义问卷-获取问卷题目
     *
     * 
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "getQuestionList")
    @ResponseBody
    public ResponseList<ProjectQuestionInfo> getQuestionList(HttpServletRequest request) throws IOException {
        String projectQuestionnaireId = request.getParameter("questionnaireId");

        ProjectQuestionDto dto = new ProjectQuestionDto();
        dto.setProjectQuestionnaireId(Long.parseLong(projectQuestionnaireId));
        dto.setIsValid(IsAvlidEnum.AVILD.getNo());
        dto.setDelFlag(DelFlagEnum.UNDEL.getNo());
        dto.addAsc("sort");
        ResponseList<ProjectQuestionInfo> resList = projectQuestionServiceFacade.questionList(dto);
        return resList;
    }

    /**
     * 自定义问卷-获取问卷题目
     *
     * 
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "saveQuestion")
    @ResponseBody
    public Response<CustomerAnswer> saveQuestion(HttpServletRequest request) throws IOException {
        Response<CustomerAnswer> res = new Response<CustomerAnswer>();
        //判断是否编辑
        String edit = request.getParameter("edit");
        //获取客户ID
        String customerId = request.getParameter("customerId");
        if (StringUtils.isBlank(customerId)) {
            res.fail("0000", "保存失败");
            return res;
        }
        //获取项目问卷表ID
        String projectQuestionnaireId = request.getParameter("questionnaireId");
        if (StringUtils.isBlank(projectQuestionnaireId)) {
            res.fail("0000", "保存失败");
            return res;
        }
        //获取答题内容
        String arrayJson = request.getParameter("json");
        if (StringUtils.isBlank(arrayJson)) {
            res.fail("0000", "保存失败");
            return res;
        }
        //获取用户ID
        String userId = request.getParameter("userId");
        if (StringUtils.isBlank(userId)) {
            res.fail("0000", "保存失败");
            return res;
        }
        //保存问题答案
        CustomerAnswerInfo dto = new CustomerAnswerInfo();
        dto.setCustomerId(Long.parseLong(customerId));
        dto.setProjectQuestionnaireId(Long.parseLong(projectQuestionnaireId));
        dto.setArrayJson(arrayJson);
        dto.setCreateUser(Long.parseLong(userId));
        dto.setCreateTime(new Date());
        if ("e".equals(edit)) {
            res = customerAnswerServiceFacade.edit(dto);
        } else {
            res = customerAnswerServiceFacade.add(dto);
        }

        return res;
    }

    /**
     * 自定义问卷-获取客户填写的答案
     *
     * 
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "getAnswer")
    @ResponseBody
    public ResponseList<CustomerAnswer> getAnswer(HttpServletRequest request) throws IOException {
        String projectQuestionnaireId = request.getParameter("questionnaireId");
        String customerId = request.getParameter("customerId");

        CustomerAnswerDto dto = new CustomerAnswerDto();
        dto.setProjectQuestionnaireId(Long.parseLong(projectQuestionnaireId));
        dto.setCustomerId(Long.parseLong(customerId));
        ResponseList<CustomerAnswer> response = customerAnswerServiceFacade.selectListInfoByDto(dto);
        return response;
    }

    /**
     * 跳转客户标签问题列表
     *
     * @param model
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "/toCusTagList", method = RequestMethod.GET)
    public String cusTagList(Model model, String body) throws IOException {
        CustTagReqVo reqVo = JSONObject.parseObject(body, CustTagReqVo.class);
        CustTagReqDto reqDto = reqVo.getParams();
        model.addAttribute("typeId", reqDto.getTypeId());
        model.addAttribute("customerId", reqDto.getCustomerId());
        model.addAttribute("userId", reqDto.getUserId());
        Response<Tag> res = tagServiceFacade.findById(reqDto.getTypeId());
        model.addAttribute("tagName", res.getEntity().getTagName());
        return "/custag/cusTagList";
    }

    /**
     * 查询标签接口
     *
     * 
     * @return
     */
    @RequestMapping(value = "/getTagList", method = RequestMethod.POST)
    public String cusTagList(HttpServletRequest request, HttpServletResponse response, String body) throws IOException {
        response.setContentType("application/json; charset=utf-8");
        CustTagReqVo reqDto = JSONObject.parseObject(body, CustTagReqVo.class);
        response.getWriter().append(JSONObject.toJSONStringWithDateFormat(getTagTypeListHander.hander(reqDto), "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty));
        return null;
    }

    /**
     * 获取客户标签问题列表
     *
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "getCusTagList", method = RequestMethod.POST)
    @ResponseBody
    public Page<TagInfo> getCusTagList(Long typeId, String tagName, Long customerId,
                                       Integer pageNum, Integer pageSize) {
        TagDto dto = new TagDto();
        dto.setParentId(typeId);
        dto.setTagName(tagName);
        dto.setCustomerId(customerId);
        dto.setDelFlag(DelFlagEnum.UNDEL.getNo());
        dto.addAsc("ext.id");
        Page<TagInfo> response = tagServiceFacade
                .getTagPage(dto, PageUtil.begin(pageNum, pageSize), pageSize);
        return response;
    }

    /**
     * 跳转客户标签答案页
     *
     * @param model
     * 
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "/toCusTagAnswer", method = RequestMethod.GET)
    public String cusTagAnswer(Model model, Long tagId, Long extId, String customerId,
                               String userId, String type) {
        model.addAttribute("tagId", tagId);
        model.addAttribute("extId", extId);
        model.addAttribute("userId", userId);
        model.addAttribute("customerId", customerId);
        Response<Tag> res = tagServiceFacade.findById(tagId);
        model.addAttribute("tagName", res.getEntity().getTagName());
        String url = "";
        //判断跳转页面（1多选列表 3单选列表 5手工录入）
        if ("1".equals(type)) {
            url = "/custag/select_multi";
        } else if ("3".equals(type)) {
            url = "/custag/select_single";
        } else if ("5".equals(type)) {
            url = "/custag/select_text";
        }
        return url;
    }

    /**
     * 获取客户标签问题选项
     *
     * 
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "getCusTagSelect", method = RequestMethod.POST)
    @ResponseBody
    public ResponseList<TagValue> getCusTagSelect(Long tagId) {
        TagValueDto dto = new TagValueDto();
        dto.setTagId(tagId);
        dto.setDelFlag(DelFlagEnum.UNDEL.getNo());
        ResponseList<TagValue> response = tagValueServiceFacade.findByDto(dto);
        return response;
    }

    /**
     * 获取客户标签问题答案
     *
     * 
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "getCusTagAnswer", method = RequestMethod.POST)
    @ResponseBody
    public ResponseList<CustTag> getCusTagAnswer(Long tagId, Long extId, Long customerId) {
        CustTagDto dto = new CustTagDto();
        dto.setTagId(tagId);
        dto.setTagExtId(extId);
        dto.setCustomerId(customerId);
        dto.setDelFlag(DelFlagEnum.UNDEL.getNo());
        ResponseList<CustTag> response = custTagServiceFacade.findByDto(dto);
        return response;
    }

    /**
     * 保存客户标签问题选项
     *
     * @param userId
     * @param customerId
     * @param ids        已保存的标签，用于删除或修改标识
     * @param type       1 多选  3 单选  5 文本
     * @param json
     * @return
     */
    @ApiIgnore()
    @RequestMapping(value = "saveCusTagSelect", method = RequestMethod.POST)
    @ResponseBody
    public Response<String> saveCusTagSelect(Long customerId, Long userId,
                                             String ids, String json, String type) {
        Response<String> res = new Response<String>();
        if (customerId == null || userId == null) {
            res.fail("0000", "保存失败");
            return res;
        }

        CustTagDto dto = new CustTagDto();
        dto.setCustomerId(customerId);
        dto.setAgentId(userId.toString());
        dto.setCreateUser(userId);
        dto.setUpdateUser(userId);
        Response<CustTagDto> response = custTagServiceFacade.saveOrEditCusTag(dto, json, ids, type);
        if (response.isSuccess()) {
            res.setSuccess(true);
        } else {
            res.fail("0000", "保存失败");
            return res;
        }
        return res;
    }

    /**
     * 跳转逾期签约界面
     */
    @RequestMapping(value = "/backstage_sign", method = RequestMethod.GET)
    public String backstage_sign(Model model, HttpServletRequest request, HttpServletResponse response, String body) {
        GetCustomerListReqVo reqVo = JSONObject.parseObject(body, GetCustomerListReqVo.class);
        GetCustomerListReqDto dto = reqVo.getParams();
        model.addAttribute("terminalCode", dto.getTerminalCode());
        model.addAttribute("merchantId", dto.getMerchantId());
        model.addAttribute("projectId", dto.getProjectId());
        model.addAttribute("projectCode", dto.getProjectCode());
        model.addAttribute("version", dto.getVersion());
        model.addAttribute("userId", dto.getUserId());
        model.addAttribute("token", dto.getToken());

        return "/backstage/sign";
    }

    private Response<Integer> selectOverdueSignedCount(GetProjectBusinessListReqVo reqDto){
        GetProjectBusinessListReqDto params = reqDto.getParams();
        try {
            SubscribeDto subscribeDto = new SubscribeDto();
            subscribeDto.setMerchantId(params.getMerchantId());
            subscribeDto.setPermissionUserId(Long.valueOf(params.getUserId()));
            subscribeDto.setProjectId(params.getProjectId());
            subscribeDto.setResourcesCode("menu_0003_0001");
            return subscribeServiceFacade.getOverdueSignedListCount(subscribeDto);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
    }

    /**
     * 逾期未签约列表
     * 
     * @return
     */
    @RequestMapping("selectOverdueSignedPage")
    @ResponseBody
    public String selectOverdueSignedPage(Model model, HttpServletRequest request, HttpServletResponse response, String body){
        response.setContentType("application/json; charset=utf-8");
        GetCustomerListReqVo reqVo = JSONObject.parseObject(body, GetCustomerListReqVo.class);
        GetCustomerListReqDto dto = reqVo.getParams();
        int pageNum = Integer.parseInt(dto.getPageNumber());
        int pageSize = Integer.parseInt(dto.getPageSize());
        try {
            //获取项目名称
            Long projectId = dto.getProjectId();
            //获取经纪人
            String consultantUserId = dto.getConsultantUserId();
            //获取当前用户信息
            SubscribeDto subscribeDto = new SubscribeDto();
            subscribeDto.setMerchantId(dto.getMerchantId());
            subscribeDto.setPermissionUserId(Long.valueOf(dto.getUserId()));
            subscribeDto.setProjectId(projectId);
            subscribeDto.setConsultantUserId(consultantUserId);
            subscribeDto.setCustomerName(dto.getCustomerName());
            subscribeDto.setResourcesCode("menu_0003_0001");
            Page<SubscribeDto> page = subscribeServiceFacade.getOverdueSignedPageModel(subscribeDto, PageUtil.begin(pageNum, pageSize),pageSize);
            response.getWriter().append(
                    JSONObject.toJSONStringWithDateFormat(
                            page
                            , "yyyy-MM-dd HH:mm:ss"
                            , SerializerFeature.WriteDateUseDateFormat
                            , SerializerFeature.DisableCircularReferenceDetect
                            , SerializerFeature.WriteNullStringAsEmpty));
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
    }


    /**
     * 跳转逾期收款界面
     */
    @RequestMapping(value = "/backstage_receipt", method = RequestMethod.GET)
    public String backstage_receipt(Model model, HttpServletRequest request, HttpServletResponse response, String body) {
        GetCustomerListReqVo reqVo = JSONObject.parseObject(body, GetCustomerListReqVo.class);
        GetCustomerListReqDto dto = reqVo.getParams();
        model.addAttribute("terminalCode", dto.getTerminalCode());
        model.addAttribute("merchantId", dto.getMerchantId());
        model.addAttribute("projectId", dto.getProjectId());
        model.addAttribute("projectCode", dto.getProjectCode());
        model.addAttribute("version", dto.getVersion());
        model.addAttribute("userId", dto.getUserId());
        model.addAttribute("token", dto.getToken());

        return "/backstage/receipt";
    }

    /**
     * 获取逾期未收款的数量
     * @param reqDto
     * @return
     */
    private Response<Integer> selectOverduePaymentCount(GetProjectBusinessListReqVo reqDto){
        GetProjectBusinessListReqDto params = reqDto.getParams();
        try {
            NeedReceiveRefundDto dto = new NeedReceiveRefundDto();
            dto.setMerchantId(params.getMerchantId());
            dto.setPermissionUserId(Long.valueOf(params.getUserId()));
            dto.setProjectId(params.getProjectId());
            dto.setResourcesCode("menu_0003_0001");
            return needReceiveRefundServiceFacade.getOverduePaymentListCount(dto);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    /**
     * 逾期未付款提醒列表
     * 
     * @return
     */
    @RequestMapping("selectOverduePaymentPage")
    @ResponseBody
    public String selectOverduePaymentPage(Model model, HttpServletRequest request, HttpServletResponse response, String body){
        response.setContentType("application/json; charset=utf-8");
        GetCustomerListReqVo reqVo = JSONObject.parseObject(body, GetCustomerListReqVo.class);
        GetCustomerListReqDto cudto = reqVo.getParams();
        int pageNum = Integer.parseInt(cudto.getPageNumber());
        int pageSize = Integer.parseInt(cudto.getPageSize());
        try {
            //获取项目名称
            Long projectId = cudto.getProjectId();
            //获取经纪人
            String consultantUserId = cudto.getConsultantUserId();
            //获取当前用户信息

            NeedReceiveRefundDto dto = new NeedReceiveRefundDto();
            dto.setMerchantId(cudto.getMerchantId());
            dto.setPermissionUserId(Long.valueOf(cudto.getUserId()));
            dto.setProjectId(projectId);
            dto.setConsultantUserId(consultantUserId);
            dto.setCustomerName(cudto.getCustomerName());
            dto.setResourcesCode("menu_0003_0001");
            Page<NeedReceiveRefundInfo> page = needReceiveRefundServiceFacade.getOverduePaymentPageModel(dto, PageUtil.begin(pageNum, pageSize),pageSize);
            response.getWriter().append(
                    JSONObject.toJSONStringWithDateFormat(
                            page
                            , "yyyy-MM-dd HH:mm:ss"
                            , SerializerFeature.WriteDateUseDateFormat
                            , SerializerFeature.DisableCircularReferenceDetect
                            , SerializerFeature.WriteNullStringAsEmpty));

        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
